package com.xyh.transaction.mapper;

import com.xyh.transaction.entity.Cart;
import com.xyh.transaction.entity.dto.cart.CartDto;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CartMapper {
    void insert(Cart cart);

    Cart findByUserIdAndGoods(Integer userId, Integer goodsId);

    void deleteById(Integer id);

    void update(Cart cart);

    List<Cart> findByUserId(Integer userId);

    void updateBatch(CartDto cartDto);

    void deleteByUserId(Integer userId);

    void deleteBatchById(List<Integer> ids);
}
